<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>显示员工信息</title>
	<script type="text/javascript">

    </script>
    <style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
		<SCRIPT type="text/javascript">
				function goToPage(currentPage)
				{
				    //var goodName =$("#search_txt_goodName").val();
				    //var states = $("#search_drl_states").val();
				     
					location.href = "toListUser.action?currpage="+currentPage;
				}
		</SCRIPT>
</head>
<body>
		<div>
			<table width="100%" border="1" cellspacing="0"
				style="text-align: left">
				<tbody>
					<tr>
						<td width="32" height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							序号
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							用户名
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							性别
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							联系电话
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							所属部门
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							所属职位
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							编辑操作
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							删除操作
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							查看详细
						</td>
					</tr>
				</tbody>
				<tbody>
					<s:if test="userList != null && userList.size != 0">
					<s:iterator value="userList" var="item" status="no">
						<tr>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<s:property value="#no.count" />
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userName}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userInfo.gender}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userInfo.phone}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userInfo.postInfo.sectionInfo.sectionName}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userInfo.postInfo.postName}&nbsp;
							</td>
							<td width="80" height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<a href="javascript:void(0);" onclick='location="toUpdateUser.action?userId=${item.userId}"'>修改 </a>
							</td>
							<td width="80" height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<a href="javascript:void(0);" onclick='location="toDeleteUser.action?userId=${item.userId}"'>删除 </a> &nbsp;
							</td>	
							<td width="80" height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<a href="javascript:void(0);" onclick='location="toShowDetail.action?userId=${item.userId}"'>详细 </a> &nbsp;
							</td>
						</tr>
					</s:iterator>
					</s:if><s:else>
						<tr><td colspan="10">无记录</td></tr>
					</s:else>
				</tbody>
			</table>
		</div>
		<br />
		<!--分页导航开始-->
		<div class="STYLE19">
			<s:if test="currpage > 1">
				<a href="javascript:void(0);" onclick="goToPage(${currpage - 1})">上一页</a>
			</s:if>
			<span> 第${currpage }页/共${totalpage}页 </span>
			<s:if test="currpage < totalpage">
				<a href="javascript:void(0);" onclick="goToPage(${currpage + 1})">下一页</a>
			</s:if>
		</div>
		<!--分页导航结束-->	
</body>
</html>